import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/harry";

// 计费规则
export function billingInfo(params) {
  return request({
    url: '/sys/config/billing/info',
    method: 'get',
    params: params
  })
}
// 计费规则修改
export function billingInfoUpdate(params) {
  return request({
    url: '/sys/config/billing/update',
    method: 'post',
    data: params
  })
}

// 基础配置
export function baseInfo(params) {
  return request({
    url: '/sys/config/base/info',
    method: 'get',
    params: params
  })
}
// 基础配置修改
export function baseInfoUpdate(params) {
  return request({
    url: '/sys/config/base/update',
    method: 'post',
    data: params
  })
}
// 佣金配置修改
export function CommissionInfoUpdate(params) {
  return request({
    url: `/sys/config/level/put${params.id ? `/${params.id}` :''}`,
    method: 'put',
    data: params
  })
}
// 佣金配置删除
export function CommissionInfoDel(id) {
  return request({
    url: `/sys/config/${id}`,
    method: 'delete',
  })
}

// 查询佣金规则分页列表
export function listLevel(params) {
  return request({
    url: '/sys/config/level/list',
    method: 'get',
    params: params
  })
}
